package com.zyd.blog.business.vo;

import com.zyd.blog.business.entity.Tags;
import com.zyd.blog.framework.object.BaseConditionVO;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 *
 * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
 * @version 1.0
 * @website https://docs.zhyd.me
 * @date 2018/4/16 16:26
 * @since 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class TagsConditionVO extends BaseConditionVO {
	private Tags tags;
	private String sort;
	private String name;

	public String getSort() {
		if (sort != null) {
			return sort.equals("asc") ? "sort asc" : "sort desc";
		} else {
			return "sort desc";
		}

	}
	public Tags getTags() {
		return this.tags;
	}


	public String getName() {
		return name != null ? name : "";
	}
}

